"use client"; import { getGamesApi, GroupType } from "@/api/home"; import { SwiperGroup } from "@/components/Card"; import { FC, PropsWithChildren, useEffect, useState } from "react"; import "swiper/css"; interface Props {} const HomeSwiper: FC> = (props) => { const [groupGames, setGroupGames] = useState([]); useEffect(() => { getGamesApi().then((res) => { setGroupGames(res.data); }); }, []); return (
{!!groupGames &&groupGames.map((group, index) => { return ; })}
); }; export default HomeSwiper;